﻿@{
    ViewBag.Title = "按周统计";
    Layout = "~/Views/Shared/_Layout.cshtml"; 
}
@using JStore.Web.Controllers.HtmlHelpers
@using SpeadFrm.Extensions
@using SpeadFrm.MvcPager
@model List<JStore.Web.Controllers.MoneyLogs.ViewModels.WeekMoneyLogModel>  
<div class="right_box_card">
    <ul>
         <li class="right_box_card2"><a href="@Url.Action("List", "MoneyLogs")">奖金管理</a></li>
        <li class="right_box_card1"><a href="@Url.Action("WeekList", "MoneyLogs")">按周统计</a></li>
    </ul>
</div>
@using (Html.BeginForm("WeekList", "MoneyLogs", FormMethod.Get))
{
    <table class="right_box_tab" style="margin-top: 10px;" width="100%" border="0" cellspacing="0"
        cellpadding="0">
        <tr height="30">
            <td>
                时间段：@Html.DropDownList("weekMoneyLogId", ViewData["WeekMoneyList"] as List<SelectListItem>)
            </td>
            <td>
                <input type="submit" class="submit" value="查询" style="float: left; width: 80px;" />
            </td>
        </tr>
    </table> 
} 
<table class="right_box_tab" style="margin-top: 10px;" width="100%" border="0" cellspacing="0"
    cellpadding="0">
    <tr height="30" class="tab_title">
        <td>
            起始时间
        </td>
        <td>
            结束时间
        </td>
        <td>
            收入金额
        </td>
        <td>
            奖金金额
        </td>
        <td>
            统计时间
        </td>
    </tr>
    @for (var i = 0; i < Model.Count; i++)
    {
        var item = Model[i];
        <tr height="35" class="tab_td1" style="line-height: 26px;" onmouseover="this.className = 'tab_td2' "
            onmouseout=" this.className = 'tab_td1'">
            @if (i == 0)
            {
                <td class="red">
                  (本周)   @item.StartDate.ToString("yyyy年MM月dd日")
                </td>
                <td class="red">
                    @item.EndDate.ToString("yyyy年MM月dd日")
                </td>
                <td class="red">
                    @item.RealMoney
                </td>
                <td class="red">
                    @item.RiseMoney
                </td>
                <td class="red">
                    @item.CreateDate
                </td>
            }
            else
            {
                <td>
                    @item.StartDate.ToString("yyyy年MM月dd日")
                </td>
                <td>
                    @item.EndDate.ToString("yyyy年MM月dd日")
                </td>
                <td>
                    @item.RealMoney
                </td>
                <td>
                    @item.RiseMoney
                </td>
                <td>
                    @item.CreateDate
                </td>
            }
        </tr>
    }
</table>
